using System.Linq;
using SymbolIntegration.core.Expressions;

namespace SymbolIntegration.core.Helpers
{
    public class IntegrationHelper
    {
        public static Expression IntegrateAsConstant(Expression expression, string variable)
        {
            return new VariableExpression(variable) * expression;
        }

        public static Expression Integrate(Expression expressionToIntegrate, string variable)
        {
            IIntegrator defaultIntegrator = new PluginIntegrator();
            var result =  Expression.Integrate(expressionToIntegrate, variable, defaultIntegrator);
            return result;
        }

    }
}